/*
 * ConstantesGenerales.java
 *
 * Created on 18 de julio de 2005, 12:29 PM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.src.computec.radar.base.constantes;
import com.src.computec.radar.base.source.CoreSource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 *
 * @author Santiago
 */

public class ConstantesGenerales {
    
    protected static ConstantesGenerales instance;
    public static String JNDINAME_DB2;
    public static String JNDINAME_DB2_XA;
    public static String JNDINAME_SQLSERVER;
    public static String JNDINAME_SQLSERVER_XA;
    
    protected ConstantesGenerales() { 
        //Para que quede en espanol
        Locale localeDefault = Locale.getDefault();
        localeDefault.setDefault(new Locale("es", "CO"));
        
        CoreSource coreSource = CoreSource.getInstance();       
        this.JNDINAME_DB2 = coreSource.getParametrosSetupKey("DataSourceNameDB2");
        this.JNDINAME_DB2_XA = coreSource.getParametrosSetupKey("DataSourceNameDB2XA");
        this.JNDINAME_SQLSERVER = coreSource.getParametrosSetupKey("DataSourceNameSqlServer");
        this.JNDINAME_SQLSERVER_XA = coreSource.getParametrosSetupKey("DataSourceNameSqlServerXA");
        System.getProperties().put("proxySet", coreSource.getParametrosSetupKey("proxySet"));
        System.getProperties().put("http.proxyHost", coreSource.getParametrosSetupKey("http.proxyHost"));
        System.getProperties().put("http.proxyPort", coreSource.getParametrosSetupKey("http.proxyPort"));
    }
    
    public static ConstantesGenerales getInstance() {
        if (instance == null) {
            instance = new ConstantesGenerales();
        }
        return instance;
    }
}